package java8.charpter01;

import java.util.Comparator;

public class Java8Tester2 {
    public static void main(String args[]) {

        String first = "";
        Comparator<String> comparator = (first1, second) -> Integer.compare(first.length(), second.length());  //编译会出错
        //不能被修改
        int num = 1;
        Converter<Integer, String> s = (param) -> System.out.println(String.valueOf(param + num));
        s.convert(2);  // 输出结果为 3
        //num = 5;
    }

    public interface Converter<T1, T2> {
        void convert(int i);
    }
}
